<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <link href="../metro/css/metro-all.css?ver=@@b-version" rel="stylesheet">

    <title>Test Marquee - Metro 4 :: Popular HTML, CSS and JS library</title>
</head>
<body class="m4-cloak h-vh-100">
<div class="container h-100 d-flex flex-justify-center flex-align-center flex-column">
    <h1 class="text-center">Marquee use accent mode<br>and ease functions</h1>

    <div class="w-100 mt-20"
         data-role="marquee"
         data-duration="3000"
         data-accent-pause="3000"
         data-direction="right"
         data-height="auto"
         data-mode="accent"
         data-ease="easeOutExpo, easeInExpo"
         data-on-marquee-item="item"
         data-on-marquee-item-complete="itemComplete"
         data-on-marquee-complete="complete"
    >
        <img src="../images/car.png" style="height: 100px;">
    </div>
</div>

<script src="../metro/js/metro.js?ver=@@b-version"></script>
<script>
    var cars = ['car', 'car-red', 'car-blue'];
    var currentCar = 0;
    function complete(){
        currentCar++;
        if (currentCar >= cars.length) {
            currentCar = 0;
        }
        $("img").attr("src", "../images/"+cars[currentCar]+".png");
    }
</script>
</body>
</html>
